<?php
$felhasznalonev = !empty($_POST["felhasznalonev"]) ? $_POST["felhasznalonev"] : "";
?>
<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<title>POS</title>
		<link rel="stylesheet" href="<?= $css; ?>style.css" media="screen">
		<link rel="stylesheet" href="<?= $css.$url[0].".css"; ?>" media="screen">
		<script type="text/javascript" src="<?= $js; ?>jquery.min.js"></script>
	</head>

	<body>
		<div id="msg" style="display: none;"><?= isset($msg) ? $msg : ""; ?></div>

		<div id="content">
			<form id="bejelentkezes" action="" method="POST">
				Felhasználónév:<br>
				<input type="text" name="felhasznalonev" value="<?= $felhasznalonev; ?>" autofocus><br>
				Jelszó:<br>
				<input type="password" name="jelszo"><br>
				<input type="submit" name="bejelentkezes" value="Bejelentkezés">
			</form>
		</div>

		<script type="text/javascript">
			function setSize(){
				$('#content').css({
					'height' : $(window).height()-20,
					'font-size' : $(window).height()/12
				});

				$('#content input').css({
					'font-size' : $(window).height()/12
				});

				$('#bejelentkezes').css({
					'margin-top' : ($('#content').height()-$('#bejelentkezes').height())/2
				});
			}

			$(window).resize(function(){ setSize(); });

			setSize();

			var msg = document.getElementById("msg");
			if(0 < msg.innerHTML.length){ alert(msg.innerHTML); }
		</script>
	</body>
</html>